// 收款信息
<template>
    <Form :model="formItem" :label-width="110">
        <FormItem label="小程序AppID">
            <Input v-model="formItem.app_id" placeholder="小程序AppID"></Input>
        </FormItem>
        <FormItem label="AppSecret">
            <Input v-model="formItem.app_secret" placeholder="AppSecret"></Input>
        </FormItem>

        <FormItem>
            <Button type="primary" @click.stop="btn">修改</Button>
            <Button type="" style="margin-left: 8px">Cancel</Button>
        </FormItem>

    </Form>
</template>

<script type="text/ecmascript-6">
export default {
  data() {
    return {
      formItem: {}
    };
  },
  created() {
    this.getWxInfo();
  },
  methods: {
    getWxInfo: function() {
      $.ajax({
        url: BASE_URL + "groupset/secSmallRoutineSet",
        type: "get",
        success: function(res) {
          this.formItem = res;
        }.bind(this)
      });
    },
    btn: function() {
      $.ajax({
        url: BASE_URL + "groupset/updateSecSmallRoutineSet",
        type: "get",
        data: {
          secSmallRoutineSet: JSON.stringify(this.formItem)
        },
        success: function(res) {
          if (res) {
            this.getWxInfo();
          }
        }.bind(this)
      });
    }
  }
};
</script>

<style scoped >
</style>
